package com.space.laboratory.provider.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.cloud.stream.function.StreamBridge;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author <a href="mailto:414563035@qq.com">Bedroom</a>
 * @date 2021/4/30 3:37 下午
 */
@Configuration
public class Mq {
    @Bean
    public P a() {
        return new P();
    }

    static class P implements CommandLineRunner {
        @Autowired
        StreamBridge streamBridge;

        @Override
        public void run(String... args) throws Exception {
            System.out.println("--------");
            streamBridge.send("userInfoTopic-in-0", "mm");
        }
    }
}
